﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wutos.Domain;
using Wutos.Repository;

namespace Wutos.App
{
    public class StockApp
    {
        private Wutos.Domain.IStockRepository service = new StockRepository();
        public List<StockEntity> GetList()
        {
            List<StockEntity> list = service.FindList("select *from stock order by 成交日期");
            return list;
        }

        public List<StockEntity> GetList(string code)
        {
            string strSql = $"select *from stock where \"证券代码\"='{code}'";
            //Console.WriteLine(strSql);  
            List<StockEntity> list = service.FindList(strSql);
            return list;
        }
    }
}
